def base_converter(decimal, base):
    rem_stack = list()
    digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ '
    number = decimal
    base_string = ''
    
    if not(base in range(2, 36)):
        return ''
    
    while (number > 0 ):
        rem = number % base
        rem_stack.append(rem)
        number //=base
        
    while rem_stack:
        base_string += digits[rem_stack.pop()]
        
    return base_string
